package com.vcms.cms.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ConfigAttr entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "config_attr", catalog = "vcms_0.1")
public class ConfigAttr implements java.io.Serializable {

	// Fields

	private Integer configAttrId;
	private Config config;
	private String attrName;
	private String attrValue;

	// Constructors

	/** default constructor */
	public ConfigAttr() {
	}

	/** full constructor */
	public ConfigAttr(Config config, String attrName, String attrValue) {
		this.config = config;
		this.attrName = attrName;
		this.attrValue = attrValue;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "configAttrId", unique = true, nullable = false)
	public Integer getConfigAttrId() {
		return this.configAttrId;
	}

	public void setConfigAttrId(Integer configAttrId) {
		this.configAttrId = configAttrId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "configId")
	public Config getConfig() {
		return this.config;
	}

	public void setConfig(Config config) {
		this.config = config;
	}

	@Column(name = "attrName", length = 100)
	public String getAttrName() {
		return this.attrName;
	}

	public void setAttrName(String attrName) {
		this.attrName = attrName;
	}

	@Column(name = "attrValue", length = 100)
	public String getAttrValue() {
		return this.attrValue;
	}

	public void setAttrValue(String attrValue) {
		this.attrValue = attrValue;
	}

}